package com.jy.modules.cims.data.dao;

import java.util.List;
import java.util.Map;

import com.jy.modules.cims.data.dto.LoanDetailDto;
import com.jy.modules.cims.data.dto.LoanSettleApplyIdDto;
import com.jy.modules.cims.data.dto.loan.LoanBorrowerAssetDto;
import com.jy.modules.cims.data.dto.loan.LoanBorrowerCreditInfoDto;
import com.jy.modules.cims.data.dto.loan.LoanBorrowerDto;
import com.jy.modules.cims.data.dto.loan.LoanBorrowerEntityDto;
import com.jy.modules.cims.data.dto.loan.LoanBorrowerJobDto;
import com.jy.modules.cims.data.dto.loan.LoanBorrowerLoanInfoDto;
import com.jy.modules.cims.data.dto.loan.LoanDealBaseInfoDto;
import com.jy.platform.core.mybatis.MyBatisRepository;

/**
 * 
 * @author zhiqiang 自定义操作贷款的持久层接口
 * 
 */
@MyBatisRepository
public interface LoanDao {

	/**
	 * @author zhiqiang
	 * @description: 指定字段更新对象T_C_MM_QUOTA_LOAN_DETAIL
	 * @date 2015-01-12 20:34:29
	 * @param paramMap
	 */
	public void updateTCMmQuotaLoanDetailStatus(Map<String, Object> paramMap);

	/**
	 * @Title updateTCMmQuotaLoanDetailStatusByIntoAppCodes
	 * @Description 批量更新额度申请贷款状态
	 * @param paramMap
	 *            void
	 * @author lizhiqiang
	 * @date 2015-1-23-下午5:58:35
	 * @update
	 * @throws
	 */
	public void updateTCMmQuotaLoanDetailStatusByContractNos(Map<String, Object> paramMap);

	/**
	 * 更新贷款额度下的贷款明细交易状态
	 * 
	 * @param paramMap
	 */
	public void updateTCMmQuotaLoanDetailStatusByQuotaCode(Map<String, Object> paramMap);

	/**
	 * @Title updateTCMmQuotaLoanDetailForLoanEachStatusByContractNos
	 * @Description 批量更新贷款明细表的贷款交互状态 loan_each_status
	 * @param paramMap
	 *            void
	 * @author shengzhoutao
	 * @date 2015-4-16-下午5:58:35
	 * @update
	 * @throws
	 */
	public void updateTCMmQuotaLoanDetailForLoanEachStatusByContractNos(Map<String, Object> paramMap);

	/**
	 * 获取贷款交易明细
	 * 
	 * @Title getDealDetailByLoanListBypading
	 * @Description TODO
	 * @param paramMap
	 * @return List<LoanDetailDto>
	 * @author lizhiqiang
	 * @date 2015-2-11-下午2:52:38
	 * @update
	 * @throws
	 */
	public List<LoanDetailDto> getDealDetailByLoanListByPaging(Map<String, Object> paramMap);

	/**
	 * 
	 * @Title getDealDetailByLoanList
	 * @Description TODO
	 * @param paramMap
	 * @return List<LoanDetailDto>
	 * @author lizhiqiang
	 * @date 2015-2-11-下午3:45:36
	 * @update
	 * @throws
	 */
	public List<LoanDetailDto> getDealDetailByLoanList(Map<String, Object> paramMap);

	/**
	 * 查询贷款交易流水号
	 * 
	 * @param paramMap
	 * @return
	 */
	public List<LoanDetailDto> getLoanContractNoAll(Map<String, Object> searchParams);

	/**
	 * 查询贷款交易合同号
	 * 
	 * @param paramMap
	 * @return
	 */
	public List<LoanDetailDto> getLoanContractNoList(Map<String, String> paramMap);

	/**
	 * 
	 * @param paramMap
	 * @return
	 */
	public List<LoanDetailDto> getLoanDetailByLoanDetailIds(Map<String, Object> paramMap);

	/**
	 * 
	 * @param paramMap
	 * @return
	 */
	public List<LoanDetailDto> getLoanDetailByDealIds(Map<String, Object> paramMap);

	/**
	 * 
	 * @param paramMap
	 * @throws Exception
	 */
	public void updateLoanStatusByIds(Map<String, Object> paramMap) throws Exception;

	/**
	 * 
	 * @param paramMap
	 * @throws Exception
	 */
	public void updateTCMmLoanDetail(Map<String, Object> paramMap) throws Exception;
	
	
	/**
	 * 更新高风险贷款状态
	 * 
	 * @param paramMap
	 * @throws Exception
	 */
	public void updateRiskLoanStatusByIds(Map<String, Object> paramMap) throws Exception;

	/**
	 * 
	 * @param paramMap
	 * @throws Exception
	 */
	public void updateLoanStatusByDealIds(Map<String, Object> paramMap) throws Exception;

	/**
	 * @Title updateTCMmQuotaLoanDetailLoanStatusByIds
	 * @Description 批量贷款状态
	 * @param paramMap
	 * @author zhuwenbin
	 * @date 2015-3-02-下午5:58:35
	 * @update
	 * @throws
	 */
	public void updateTCMmLoanDetailLoanStatusByIds(Map<String, Object> paramMap) throws Exception;

	/**
	 * 通过合同号批量更新贷款状态
	 * 
	 * @param paramMap
	 * @throws Exception
	 */
	public void updateTCMmLoanDetailLoanStatusByContractNos(Map<String, Object> paramMap) throws Exception;

	/**
	 * 根据合同号获取贷款交易流水号
	 * 
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	public List<String> getLoanDealCodeByContractNo(Map<String, Object> paramMap) throws Exception;

	/**
	 * 新天导出报表，查询我司拒绝放贷贷款明细
	 * 
	 * @param paramMap
	 * @return
	 */
	public List<Map<String, Object>> getLoanDetail(Map<String, Object> paramMap);

	/**
	 * @description 修改交互状态
	 * @param paramMap
	 */
	public void updateLoanDetailEachStatus(Map<String, Object> paramMap);
	
	 /**
     * 
     * @Title getLoanDetailForSettle
     * @Description TODO
     * @param searchParams
     * @return 
     * List<LoanDetailDto> 
     * @author lizhiqiang
     * @date 2016-8-26-下午3:59:32
     * @update 
     * @throws
     */
    public List<LoanDetailDto> getLoanDetailForSettle(Map<String,Object> searchParams);
    /**
     * 
     * @Title getCountLoanDetailForSettle
     * @Description TODO
     * @param searchParams
     * @return 
     * int 
     * @author lizhiqiang
     * @date 2016-8-29-上午10:16:26
     * @update 
     * @throws
     */
    public int getCountLoanDetailForSettle(Map<String,Object> searchParams);
    
    /**
     * 
     * @Title getLoanSettleApplyIdByDealCode
     * @Description TODO
     * @param searchParams
     * @return 
     * List<LoanSettleApplyIdDto> 
     * @author lizhiqiang
     * @date 2016-8-30-下午4:46:07
     * @update 
     * @throws
     */
    public List<LoanSettleApplyIdDto> getLoanSettleApplyIdByDealCode(Map<String,Object> searchParams);
    /**
     * 
     * @Title updateLoanSettleApplyIdByDealCode
     * @Description TODO
     * @param searchParams
     * @throws Exception 
     * void 
     * @author lizhiqiang
     * @date 2016-8-30-下午5:16:09
     * @update 
     * @throws
     */
    public void updateLoanSettleApplyIdByDealCode(Map<String,Object> searchParams) throws Exception;

    /**
     * 更新贷款费用信息
     * @author zhangmi
     * @date  2016年9月2日
     * @param searchParams
     * @throws Exception
     */
    public void updateLoanDetailsFee(Map<String,Object> searchParams) throws Exception;
    
    /**
     * 更新贷款账单日
     * @param searchParams
     * @throws Exception
     */
    public void updateLoanDetailbyContractNo(List<LoanDetailDto> loanDetailDtoList) throws Exception;
    

    /**
     * 根据合作机构-贷款状态，交互状态，查询贷款数据
     * @author zhangmi
     * @date  2016年11月21日
     * @param searchParams
     * @return
     * @throws Exception
     */
    public List<LoanDetailDto> searchLoanByCooCodeAndSatus(Map<String,Object> searchParams) throws Exception;

    /**
     * @Title getLoanDealBaseInfoList
     * @Description 查询分配给合作机构的贷款列表
     * @param searchParams
     * @return 
     * @author TIANMAOSHUI
     * @date 2016-11-18
     */
    public List<LoanDealBaseInfoDto> getLoanDealBaseInfoListByPaging(Map<String,Object> searchParams);
    /**
     * @Title getLoanBorrowerInfoByLoanNumber
     * @Description 查询分配给合作机构的贷款借款人信息
     * @param searchParams
     * @return 
     * @author TIANMAOSHUI
     * @date 2016-12-8
     */
    public List<LoanBorrowerDto> getLoanBorrowerInfoByLoanNumber(Map<String,Object> searchParams);
    /**
     * @Title getLoanBorrowerJobsByLoanNumber
     * @Description 查询分配给合作机构的贷款借款人工作信息
     * @param searchParams
     * @return 
     * @author TIANMAOSHUI
     * @date 2016-12-12
     */
    public List<LoanBorrowerJobDto> getLoanBorrowerJobsByLoanNumber(Map<String,Object> searchParams);
    /**
     * @Title getLoanBorrowerCreditInfoByLoanNumber
     * @Description 查询分配给合作机构的贷款借款人征信信息
     * @param searchParams
     * @return 
     * @author TIANMAOSHUI
     * @date 2016-12-12
     */
    public List<LoanBorrowerCreditInfoDto> getLoanBorrowerCreditInfoByLoanNumber(Map<String,Object> searchParams);
    /**
     * @Title getLoanBorrowerEntityByLoanNumber
     * @Description 查询分配给合作机构的贷款借款人拥有实体信息
     * @param searchParams
     * @return 
     * @author TIANMAOSHUI
     * @date 2016-12-12
     */
    public List<LoanBorrowerEntityDto> getLoanBorrowerEntityByLoanNumber(Map<String,Object> searchParams);
    /**
     * @Title getLoanBorrowerLoanInfoByLoanNumber
     * @Description 查询分配给合作机构的贷款借款人银行卡信息
     * @param searchParams
     * @return 
     * @author TIANMAOSHUI
     * @date 2016-12-12
     */
    public List<LoanBorrowerLoanInfoDto> getLoanBorrowerLoanInfoByLoanNumber(Map<String,Object> searchParams);
    /**
     * @Title getLoanBorrowerAssetByLoanNumber
     * @Description 查询分配给合作机构的贷款借款人资产信息
     * @param searchParams
     * @return 
     * @author TIANMAOSHUI
     * @date 2016-12-13
     */
    public List<LoanBorrowerAssetDto> getLoanBorrowerAssetByLoanNumber(Map<String,Object> searchParams);
}